<script>
import store from '/store'
export default {
	onLaunch: function () {
		console.log('App Launch')
		this.getRelationInfo()
		this.init()
	},
	globalData: {  
	    newsDetailUrl: ''  
	},
	methods: {
		/* 初始化 */
		init() {
			const token = store.state.userInfo.token
			/* 判断是否有token，有token则尝试获取用户信息 */
			if (!token) return
			store.dispatch('userInfo/getUserInfo')
		},
		getRelationInfo(){
			store.dispatch('relationInfo/getRelationInfo')
		}
	}
}
</script>

<style lang="scss">
@import '@/uni_modules/uv-ui-tools/index.scss';
/*每个页面公共css */
</style>
